#include<AT89X52.h>

void Port2_Open()
{
  P2=0X0;
}
void Port2_Close()
{
  P2=0XFF;
}

int Delay(int z)
{
   int i;
   while(z--)
    {
     for(i=655535;i>0;i--)
     {;}
    }
}

unsigned char idata b=0;
unsigned char str1[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff};
void Port1_Open()
{
   for(b=0;b<9;b++)
   {
     P1=str1[b];
	 P2=0x00;
     Delay(1000);
   }
}


void main1()
{

     Port2_Open();
     Delay(1000);
     Port2_Close();
     Delay(1000);
     Port1_Open();
     Delay(1000);

}
